package com.github.zzay.care.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.zzay.care.dto.EmployeeDto;
import com.github.zzay.care.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zzay
 * @interfaceName EmployeeMapper
 * @description Mapper class for entity "Employee"
 * @create 2022/07/06 09:07
 */
@Mapper
@Repository
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * Select all information.
     *
     * @return A list of all information
     */
    List<EmployeeDto> selectAll();

    /**
     * Select the employee with the given name.
     *
     * @param name Name
     * @return Employee with the given name
     */
    EmployeeDto selectByName(String name);


    /**
     * Select the employee with the given id card number.
     *
     * @param idCard ID card number
     * @return Employee with the given id card number
     */
    EmployeeDto selectByIdCard(String idCard);

}
